﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="MVCClubSite.Web.Views.Events.List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="contentblock">
        <h2>
            Events</h2>
        <p>
            nteger urna metus, congue ut, semper at, vehicula id, massa. Curabitur sed velit.
            Suspendisse at risus. Pellentesque accumsan ornare erat. Cras turpis. Sed pulvinar
            pharetra turpis. Morbi lorem pede, laoreet eget, rhoncus ut, fringilla luctus, tellus.
            In tellus urna, pulvinar at, viverra nec, pharetra eget, sem. Ut porttitor dolor
            ac ipsum. Phasellus sed quam. Praesent egestas imperdiet dolor.
        </p>
        <table>
            <tr>
                <td style="padding: 0px 10px 0px 0px;">
                    <%= Html.ActionLink("Recent Events", "Recent", "Events") %>
                </td>
                <% if (User.IsInRole("Administrator"))
                   { %>
                <td style="padding: 0px 10px 0px 0px;">
                    <%= Html.ActionLink("Create New Event", "New", "Events") %>
                </td>
                <td style="padding: 0px 10px 0px 0px;">
                    <%= Html.ActionLink("View Locations", "List", "Locations") %>
                </td>
                <td style="padding: 0px 10px 0px 0px;">
                    <%= Html.ActionLink("Create New Location", "Create", "Locations") %>
                </td>
                <% } %>
            </tr>
        </table>
        <hr />
        <div style="float: left; width: 75%">
            <div style="padding: 0px 25px 5px 5px;">
                <h3>
                    Upcomming Events</h3>
                <% foreach (Event e in ViewData.Model.UpCommingEvents)
                   { %>
                <div class="event">
                    <%= Html.ActionLink(e.Title, "Details", "Events", new{ id = e.ID }, null) %>
                    <%= e.Description %>
                </div>
                <%} %>
                <div class="pager">
                    <%= Html.Pager(ViewData.Model.UpCommingEvents.PageSize, ViewData.Model.UpCommingEvents.PageNumber, ViewData.Model.UpCommingEvents.TotalItemCount)%>
                </div>
            </div>
        </div>
        <div style="float: left; width: 25%;">
            <div style="padding: 0px 5px 5px 5px;">
                <h3>
                    Recent Events</h3>
                <% foreach (Event e in ViewData.Model.RecentEvents)
                   { %>
                <div class="event">
                    <%= Html.ActionLink(e.Title, "Details", "Events", new{ id = e.ID }, null) %>
                    <br />
                    <%= e.StartDateTime %>
                    <br /><br />
                </div>
                <%} %>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
</asp:Content>
